const mongoose = require('mongoose')
const { Schema, model } = mongoose

const Banners = new Schema({
    id_drama:{
        type: Schema.Types.ObjectId,
        ref:'Dramas',
        require:true,
    },
    cover:{
        type: String,
        default:"https://api.gronaki.top/public/banners/Banner1.png",
        require:true,
    },
    fun:{
        type: String,
        default:"goToDetail",
        require:true,
    },
    num:{
        type: Number,
        min:0,
        max:4,
        require:true
    }
    
}, { timestamps: true, versionKey: false })

module.exports = model('Banners', Banners, 'Banners')